const connection = require("../config/mysql")

class FileService {
    async create(filename, mimeType, size, user_id) {
        const statement = "INSERT INTO avatar (filename,mimeType,size,user_id) VALUES (?,?,?,?);"
        const [result] = await connection.execute(statement, [filename, mimeType, size, user_id])
        try {
            return result
        } catch (error) {
            console.log(error);
        }
    }
}

module.exports = new FileService()